package com.zzyl.nursing.controller.member;

import com.zzyl.nursing.dto.UserLoginRequestDto;
import com.zzyl.nursing.service.IFamilyMemberService;
import com.zzyl.nursing.vo.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;

/**
 * 老人家属Controller
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
@Slf4j
@RestController
@RequestMapping("/member/user")
@Api(tags = "老人家属相关接口")
public class FamilyMemberController extends BaseController
{
    @Autowired
    private IFamilyMemberService familyMemberService;

    /**
     * 用户端登录
     */
    @PostMapping("/login")
    @ApiOperation(value = "用户端登录")
    public AjaxResult login(@RequestBody UserLoginRequestDto userLoginRequestDto)
    {
        log.info("接收到的小程序请求参数，{}", userLoginRequestDto);
        LoginVo loginVo = familyMemberService.login(userLoginRequestDto);
        return success(loginVo);
    }

}
